﻿<UserControl x:Class="Weather.Hub"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:Weather="clr-namespace:Weather"
             Foreground="White" Loaded="UserControlLoaded">
    <UserControl.Background>
        <LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
            <GradientStop Color="#164788" Offset="0"/>
            <GradientStop Color="#41afce" Offset="1"/>
        </LinearGradientBrush>
    </UserControl.Background>
    <UserControl.Resources>
        <Storyboard x:Key="ShowVideoAnim">
            <DoubleAnimation Storyboard.TargetName="MediaElement" Storyboard.TargetProperty="Opacity" From="-0.5" To="1" Duration="0:0:2.5"/>
        </Storyboard>
    </UserControl.Resources>
    <Grid>
        <!--<Image Source="Resources/weatherhub_placeholder.jpg" Stretch="UniformToFill"/>-->
        <MediaElement Name="MediaElement" LoadedBehavior="Manual" Stretch="UniformToFill" MediaEnded="MediaElementMediaEnded" Opacity="0"/>
        <Image Name="BackButton" Margin="50,58,20,0" Source="Resources/back_icon_hub.png" Width="48" HorizontalAlignment="Left" VerticalAlignment="Top" MouseLeftButtonUp="BackButtonMouseLeftButtonUp"/>
        <StackPanel Orientation="Horizontal" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="150,20,0,0">
            <StackPanel>
                <StackPanel Orientation="Horizontal">
                    <TextBlock Name="CurrentTemp" Text="59°" FontSize="140" FontWeight="Light"/>
                    <StackPanel VerticalAlignment="Bottom" Margin="0,0,40,30">
                        <TextBlock Name="CurrentSky" Text="Mostly Cloudy" DockPanel.Dock="Bottom" FontSize="20" FontWeight="Light"/>
                        <TextBlock Name="CurrentFeelsLike" Text="Feels like: 59°" DockPanel.Dock="Bottom" FontSize="20" FontWeight="Light"/>
                    </StackPanel>
                </StackPanel>
                <TextBlock Name="CurrentLocation" Text="Redmond, WA" DockPanel.Dock="Bottom" FontSize="60" FontWeight="Light" Margin="0,-30,0,0"/>
            </StackPanel>
            <Grid Name="HourForecastGrid" VerticalAlignment="Bottom" Margin="30,0,0,0">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="*"/>
                    <ColumnDefinition Width="30"/>
                    <ColumnDefinition Width="*"/>
                    <ColumnDefinition Width="30"/>
                    <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <Weather:HourForecastItem/>
                <Weather:HourForecastItem Grid.Column="2"/>
                <Weather:HourForecastItem Grid.Column="4"/>
            </Grid>
        </StackPanel>
        <Grid Name="ForecastGrid" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="150,350,0,0">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="230"/>
                <ColumnDefinition Width="5"/>
                <ColumnDefinition Width="230"/>
                <ColumnDefinition Width="5"/>
                <ColumnDefinition Width="230"/>
                <ColumnDefinition Width="5"/>
                <ColumnDefinition Width="230"/>
                <ColumnDefinition Width="5"/>
                <ColumnDefinition Width="230"/>
            </Grid.ColumnDefinitions>
            <Weather:ForecastItem/>
            <Weather:ForecastItem Grid.Column="2" Background="#78556c"/>
            <Weather:ForecastItem Grid.Column="4" Background="#b98334"/>
            <Weather:ForecastItem Grid.Column="6" Background="#a76248"/>
            <Weather:ForecastItem Grid.Column="8" Background="#345b9c"/>
        </Grid>
        <TextBlock Name="ProviderCopyright" VerticalAlignment="Bottom" HorizontalAlignment="Left" FontSize="12" Margin="150,0,0,10"/>
    </Grid>
</UserControl>
